home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
program
/
greed.zip
/
RSTRFNC.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-04
|
3KB
|
65 lines
/* REXX *********************************************/
/* */
/* Program name: RSTRFNC */
/* Function : Restore Backup after the failing */
/* installation */
/* example for the post-install- */
/* failure exit */
/* */
/* Syntax : Call from the INSTALL.DAT via: */
/* START_REXX_IF_FAILURE=RESTOREP dest_path */
/* */
/* Changes : */
/* */
/* Made use of GREED. 21 May 1996 / 21:22:36 JRK */
/****************************************************/
Parse Arg destPath
/*-------------(Write lines into file)--------------*/
filename = destPath'\install.log'
rc = LineOut( filename, 'Destination Directory:' destPath)
/*==============(Exception handling)================*/
Signal On Failure Name CLEARUP
Signal On Halt Name CLEARUP
Signal On Syntax Name CLEARUP
/*==========(Initialize RexxUtil support)===========*/
If RxFuncQuery('SysLoadFuncs') Then Do
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
End /* If RxFuncQuery... */
/*--------------(Save directory)---------------*/
directory = destPath||'\SAVEPREV'
/*-----------(Find file/Set attributes)-------------*/
rc = SysFileTree( directory||'\*.fnc', fileList, 'FO' )
Do i = 1 To fileList.0
name = FileSpec( "Name", fileList.i ) /* FILENAME.EXT */
delRC = SysFileDelete( destPath'\'name )
a = "Delete: " destPath'\'name || ", RC="delRC
Queue Date( S ) Time() a
/*------------------(copy file)-------------------*/
"unpack" fileList.i destPath||"\ >>NUL"
/* If rc = 0 Then delRC = SysFileDelete( fileList.i ) */
a = "unpack" fileList.i destPath||"\" || ", RC="rc
Queue Date( S ) Time() 'Restore:' a
End /* If ... */
/*-------------(Remove directory)--------------*/
/* rc = SysRmDir( directory ) */
/*---------------(Set key value data)---------------*/
inifile = 'GREED.INI' /* USER SYSTEM BOTH Pathname */
appl = 'GREEDX' /* Application name */
key = 'Cnr_BColor' /* Key name */
value = SysIni( inifile, appl, key )
If value = '13160392' Then Do
value = '13487565' /* Key value data */
result = SysIni( inifile, appl, key, value )
End
/*================(End this program)================*/
Return
CLEARUP:
Return